package com.group9.handinhand.service;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.group9.handinhand.service.so.OfferPostSO;
import com.group9.handinhand.service.so.OfferResponseSO;
import com.group9.handinhand.service.so.OfferSO;
import com.group9.handinhand.service.so.UserSO;
import com.group9.handinhand.service.so.UserTagSO;
/**
 * 
 * Interface that defines the offer service.
 *
 */
public interface OfferService {
	
	static final Logger logger = LoggerFactory.getLogger(OfferService.class);

	public OfferSO saveOffer(OfferSO so, UserSO user, Long communityId);

	public OfferSO getOfferById(Long offerId);
	
	public List<OfferSO> getRespondedOffersByUser(UserSO user);
	
	public List<OfferSO> getModeratedOffersByUser(UserSO user);
	
	public OfferPostSO saveOfferPost(Long offerId,Long userId, String post);

	OfferResponseSO saveOfferResponse(OfferSO offer, Long userId,int goodsAmount);

	ArrayList<OfferResponseSO> getRequestResponsesByUserIdAndOfferId(Long userId, Long offerId);
	
	public List<OfferSO> getOffersByTag(UserTagSO tag);
	public List<OfferSO> getOffersByTagName(String keyword);
	
	public List<OfferSO> getOffersByName(String keyword);
	public List<UserSO> getModeratorsByOfferId(Long offerId);

	public void updateOffer(OfferSO offer);

	public OfferSO getModeratedOfferByOfferIdAndUserId(Long offerId, Long userId);

	
}